<?php

class ZFDulcet_Grid_Template_Table extends Bvb_Grid_Template_Table {

	public function globalStart() {
		return "<table id=\"{GRID_ID}\" class=\"display isdatatable\">";
	}

	public function globalEnd() {
		return '</table>';
	}

	public function noResults($message) {
		// str_repeat("<td>&nbsp;</td>", ($this->options['colspan']-1))
		//return "<tfoot><tr><td  " . $this->getClass('noRecords') . " >$message</td></tr></tfoot>" . PHP_EOL;
		return '';
	}

	public function titlesStart() {
		return "<thead><tr>\n";
	}

	public function titlesEnd() {
		return "</tr></thead>\n";
	}

	public function titlesLoop($title, $colspan) {
		return '  ' . parent::titlesLoop($title, $colspan) . "\n";
	}

	public function loopStart($class, $style) {
		return parent::loopStart($class, $style) . "\n";
	}

	public function loopLoop($value, $class, $style, $rowspan, $colspan) {
		return '  ' . parent::loopLoop($value, $class, $style, $rowspan, $colspan) . "\n";
	}

	public function pagination($pagination, $numberRecords, $perPage, $pageSelect) {
		//$this->result['pagination'] = func_get_args();
		return '<tfoot><tr class="pagination"><td colspan="' . $this->options['colspan'] . '">
				<span class="total">Total: ' . $numberRecords . ' registros</span>
				<span class="paginas">' . $pagination . '</span>
				<span class="goto">' . $pageSelect . '</span>
			</td></tr></tfoot>';
	}

}